using CNRegex.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using NHibernate;
namespace CNRegex.Biz.BizAccess {
	public partial class  BizRegexUserBlog
	{
		private void Initialize()
		{

		}
		public void Create(RegexUserBlog model, RegexUserBlogContent contentModel)
		{
			dbAccess.Create(model, contentModel);
		}

		public void Save(RegexUserBlog model, RegexUserBlogContent contentModel)
		{
			dbAccess.Save(model, contentModel);
		}

		public IList<Guid> ListUserBlogCataloies(Guid userID)
		{
			return dbAccess.ListBy(x => x.UserID == userID).Select(x => x.CatalogID).Distinct().ToList();
		}

		public IList<RegexUserBlog> ListUserLatestBlogs(Guid userID, int count)
		{
			return dbAccess.ListUserLatestBlogs(userID, count);
		}

		public IList<RegexUserBlog> ListUserRecommendBlogs(Guid userID, int count)
		{
			return dbAccess.ListUserRecommendBlogs(userID, count);
		}
	}
}
		